package com.ruoyi.system.service.customer.impl;

import java.util.List;

import com.ruoyi.system.domain.customer.CustomerInfo;
import com.ruoyi.system.mapper.customer.CustomerInfoMapper;
import com.ruoyi.system.service.customer.CustomerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 客户信息Service业务层处理
 * 
 * @author 张少丛
 * @date 2020-11-19
 */
@Service
public class CustomerInfoServiceImpl implements CustomerInfoService
{
    @Autowired
    private CustomerInfoMapper customerInfoMapper;

    /**
     * 查询客户信息
     * 
     * @param customerInfId 客户信息ID
     * @return 客户信息
     */
    @Override
    public CustomerInfo selectCustomerInfoById(Integer customerInfId)
    {
        return customerInfoMapper.selectCustomerInfoById(customerInfId);
    }

    @Override
    public CustomerInfo findAllById(Integer customerId) {
        return customerInfoMapper.findAllById(customerId);
    }

    /**
     * 查询客户信息列表
     * 
     * @param customerInfo 客户信息
     * @return 客户信息
     */
    @Override
    public List<CustomerInfo> selectCustomerInfoList(CustomerInfo customerInfo)
    {
        return customerInfoMapper.selectCustomerInfoList(customerInfo);
    }

    /**
     * 新增客户信息
     * 
     * @param customerInfo 客户信息
     * @return 结果
     */
    @Override
    public int insertCustomerInfo(CustomerInfo customerInfo)
    {
        return customerInfoMapper.insertCustomerInfo(customerInfo);
    }

    /**
     * 修改客户信息
     * 
     * @param customerInfo 客户信息
     * @return 结果
     */
    @Override
    public int updateCustomerInfo(CustomerInfo customerInfo)
    {
        return customerInfoMapper.updateCustomerInfo(customerInfo);
    }

    /**
     * 批量删除客户信息
     * 
     * @param customerInfIds 需要删除的客户信息ID
     * @return 结果
     */
    @Override
    public int deleteCustomerInfoByIds(Integer[] customerInfIds)
    {
        return customerInfoMapper.deleteCustomerInfoByIds(customerInfIds);
    }

    /**
     * 删除客户信息信息
     * 
     * @param customerInfId 客户信息ID
     * @return 结果
     */
    @Override
    public int deleteCustomerInfoById(Integer customerInfId)
    {
        return customerInfoMapper.deleteCustomerInfoById(customerInfId);
    }
}
